Show the user avatar for all users, including the root user. The root
user will always have the generic avatar, but it looks more consistent
than showing no avatar at all.
This way we also don't have to worry about the spacing introduced by the
polkit-dialog-user-layout CSS class, which would give the
"Administrator" label a small offset to the left.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/788
iconSize: DIALOG_ICON_SIZE,
styleClass: 'polkit-dialog-user-icon',
});
- this._userAvatar.hide();
userBox.add_child(this._userAvatar);
this._userLabel = new St.Label({
let userName = this._user.get_user_name();
let realName = this._user.get_real_name();
- if (userName !== 'root') {
+ if (userName !== 'root')
this._userLabel.set_text(realName);
- this._userAvatar.update();
- this._userAvatar.show();
- }
+ this._userAvatar.update();
}
cancel() {